From 8a0182e401f6e984148bcea6449c517330a372c0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 24 Feb 2019 10:37:33 -0500 Subject: [PATCH] docs: Some cosmetic fixups Some leftover comments from the drawing model rewrite. --- docs/reference/gtk/drawing-model.xml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/docs/reference/gtk/drawing-model.xml b/docs/reference/gtk/drawing-model.xml index 6400335137..f017de65be 100644 --- a/docs/reference/gtk/drawing-model.xml +++ b/docs/reference/gtk/drawing-model.xml @@ -45,7 +45,7 @@ windows gets raised to the top, then the application has to repaint it, so the previously obscured area can be shown. When the windowing system asks an application to redraw - a window, it sends an frame event + a window, it sends a frame event (expose event in X11 terminology) for that window. @@ -64,16 +64,14 @@ tell the underlying surface that it needs to repaint itself. The drawing cycle can also be initiated when a widget itself decides that it needs to update its display. For example, when the user - types a character in a GtkEntry - widget, the entry asks GTK to queue a redraw operation for - itself. + types a character in an entry widget, the entry asks GTK to queue + a redraw operation for itself. The windowing system generates frame events for surfaces. The GDK interface to the windowing system translates such events into - emissions of the #GtkSurface::render signal on the affected surfaces. + emissions of the ::render signal on the affected surfaces. The GTK toplevel window connects to that signal, and reacts appropriately. @@ -205,21 +203,21 @@ Hierarchical drawing - During the Paint phase we will send a single ::render signal the toplevel + During the Paint phase GTK receives a single ::render signal on the toplevel window. The signal handler will create a snapshot object (which is a helper for creating a scene graph) and emit a GtkWidget::snapshot() signal, - which will propagate down the entire widget hierarchy. This lets each widget + which will propagate down the widget hierarchy. This lets each widget snapshot its content at the right place and time, correctly handling things like partial transparencies and overlapping widgets. To avoid excessive work when generating scene graphs, GTK caches render nodes. - GtkWidget keeps a reference to its render node (which in turn, will refer to + Each widget keeps a reference to its render node (which in turn, will refer to the render nodes of children, and grandchildren, and so on), and will reuse - that node during the Paint phase. Invalidating a widget (e.g. by calling - gtk_widget_queue_draw) discards the cached render node, forcing GTK to - regenerate it the next time it needs to snapshot the widget. + that node during the Paint phase. Invalidating a widget (by calling + gtk_widget_queue_draw()) discards the cached render node, forcing the widget + to regenerate it the next time it needs to handle a ::snapshot. -- 2.30.2